package org.friping.mytool.helper;

import android.app.Activity;
import android.content.Intent;

import org.androidannotations.annotations.EBean;

@EBean
public class ActivityHelper {
    public Intent buildIntent(Activity a, Class nextActivity) {
        return buildIntent(a, nextActivity, null);
    }
    public Intent buildIntent(Activity a, Class nextActivity, Intent intent){
        if(intent == null){
            intent = new Intent();
        }

        if(intent.getComponent() == null){
            intent.setClass(a, nextActivity);
        }
        return intent;
    }
}
